<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <!--如果是IE 就以标准渲染-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <!-- 视窗——————响应式布局 -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />

    <!--当前页面的三要素-->
    <title>运维系统</title>
    <meta name="description" content="聚能优电" />
    <meta http-equiv="keywords" content="聚能优电" />
    <script type="text/javascript" src="../../js/verify.js"></script>
    <script type="text/javascript" src="../../js/common/commonfuntion.js"></script>
    
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="../../css/alarm.css" />

    <link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css" />
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_1805932_ysrcp4y0uy9.css">
    <link rel="stylesheet" type="text/css" href="../../css/uploadImg.css" />

    <style>

        html{
            width: 100%;
            height: 100%;
            overflow: auto;
        }
        html body{
            width: 100%;
            height: 100%;
            margin: 0;
            padding:0;
            overflow: auto;
        }

        .alarm_screen .m_title{
            height:auto !important;
        }

        #listdata .shiyong{
            width: 100%;
            height: 1rem;
            line-height: 1rem;
            border-bottom: 1px dotted #1B3150;
            display: block;
            
        }

        #listdata .shiyong .dataleft{
            float: left;
            width: 50%;
            line-height: 1rem;
            font-size: 0.28rem;
            height: 1rem;
            color: #435A7A;
            letter-spacing: 0;
        }

        #listdata .shiyong .dataright{
            float: right;
            width: 45%;
            height: 1rem;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            font-size: 0.28rem;
            color: #7F94B2;
            letter-spacing: 0;
        }
        #listdata .shiyong .dataright input{
            appearance:button;
            margin:0 5px 0 5px;
        }

        #listdata .jcjg{
            margin-top:10px;
            border-bottom: 1px dotted #1B3150;
        }

        #listdata .jcjg >div{
            font-family: SourceHanSansCN-Regular;
            font-size: 14px;
            color: #435A7A;
            letter-spacing: 0;
            height: 0.8rem;
            line-height: 0.8rem;
        }

        #listdata .jcjg >textarea{
            width: 94%;
            height: 1.5rem;
            padding: 0.1rem 2%;
            background: #001635;
            border: 1px solid #1B3150;
            color: #7F94B2;
        }

        /* 处理图片 */
        #img_wrap h3{
            font-family: SourceHanSansCN-Bold;
            font-size: 0.28rem;
            color: #435A7A;
            letter-spacing: 1px;
            margin-top: 0.5rem;
            font-weight: bold;
        }
        #img_wrap #showimg{
            margin-top: 10px;
        }
        #img_wrap #showimg img{
            width: 80px;
            height: 80px;
            margin: 7px;
        }

        /* 附件 */
        #file_wrap h3{
            font-family: SourceHanSansCN-Bold;
            font-size: 0.28rem;
            color: #435A7A;
            letter-spacing: 1px;
            margin-top: 0.5rem;
            font-weight: bold;
        }
        #file_wrap #showfile{
            margin-top: 10px;
        }

        #file_wrap #showfile span{
            display: inline-block;
            padding: 0.1rem 0.2rem;
            font-family: MicrosoftYaHei;
            font-size: 0.28rem;
            color: #0167FF;
            letter-spacing: 0.88px;
            background: rgba(35, 62, 106,0.44);
            border-radius: 2px;
            margin-bottom: 0.2rem;
            margin-right: 0.2rem;
        }

       
    </style>

</head>

<body>
    <div id="container" class="alarm">
        <div class="alarm_01">
            <!--主屏内容-->
            <div class="alarm_screen">
                <div class="m_title">
                    <a href="JavaScript:history.go(-1);" class="back">
                        <img src="../../images/back.svg" alt="">
                    </a>
                    <span class="tit" id="showname"></span>
                </div>
                <div class="m_content">


                    <div class="gjdata">
                        <div class="data_wrap" id="listdata">


                        </div>

                    </div>

                </div>

                

            </div>
        </div>
    </div>


    <script>
        (function (win, doc) {
            var docEl = doc.documentElement || document.body; //获取HTML标签

            var container = doc.getElementById("container"); //container元素
            //判断是移动端设备还是PC,移动 就采用'orientationchange',横竖屏事件，PC端就采用onresize，窗口改变时间
            var resize =
                "onorientationchange" in win ? "orientationchange" : "resize";

            function rem() {
                docEl.style.fontSize = 100 * (container.clientWidth / 750) + "px";
            }

            //监听'DOMContent事件:DOM加载完成执行,如果DOMContent事件，那么执行rem函数
            doc.addEventListener("DOMContentLoaded", rem, false);

            //win下监听resize事件,如果resize事件，那么执行rem函数
            win.addEventListener(resize, rem, false);
        })(window, document);
    </script>
    <!-- js -->
    <script type="text/javascript" src="../../js/jquery-3.4.1.js"></script>
    <script type="text/javascript" src="../../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../layer/layer.js"></script>
    <script type="text/javascript" src="../../js/zooming.js"></script>
    
    <script>
        $(document).ready(function () {

            var name = GetQueryString('huidanname');
            $("#showname").html(name);

            var contantnum = GetQueryString('contantnum');

            var ordercontant = JSON.parse(window.localStorage.getItem('ordercontant'))[contantnum];

            console.log(ordercontant);

            if(ordercontant.pass){
                if( ordercontant.pass == 'yes' ){
                    $("#listdata").html( ' ' );
                    $("#listdata").html( showpass() );
                    
                    // 审核时间
                    $("#checktime").html(ordercontant.dealtime);

                    // 审核结果
                    $("#checkresult").html("审核通过");

                }else if( ordercontant.pass == 'no' ){
                    $("#listdata").html( ' ' );
                    $("#listdata").html( shownopass() );
                    
                    // 审核时间
                    $("#checktime").html( ordercontant.dealtime );

                    // 审核结果
                    $("#checkresult").html("驳回");

                    // 驳回处理人
                    $("#refuseper").html( ordercontant.nopassname );

                    // 驳回原因
                    $("#refusewhy").html( ordercontant.nopasswhy );
                    
                }

            }else{
                $("#listdata").html( ' ' );
                $("#listdata").html( showhuidan() );

                // 处理时间
                $("#dealtime").html(ordercontant.dealtime);

                // 处理人
                $("#dealname").html(ordercontant.dealname);

                // 处理结果
                $("#dealresult").html(ordercontant.dealresult);

                // 处理措施
                $("#dealway").html(ordercontant.dealway);

                // 处理照片
                if(ordercontant.uploadimg && ordercontant.uploadimg.length > 0){
                    $("#showimg").html( imgeach(ordercontant.uploadimg) );
                }else{
                    $("#img_wrap").css('display','none');
                }

                // 附件
                if(ordercontant.uploadfile && ordercontant.uploadfile.length > 0){
                    $("#showfile").html( eachfile(ordercontant.uploadfile) );
                }else{
                    $("#file_wrap").css('display','none');
                }
            }




            function showpass(){
                var str = ``;
                str += `
                <div class="datalista shiyong">
                    <span class="dataleft">审核时间</span>
                    <span class="dataright" id="checktime"></span>
                </div>
                <div class="datalista shiyong">
                    <span class="dataleft">审核结果</span>
                    <span class="dataright" id="checkresult"></span>
                </div>`;

                return str;
            }


            function shownopass(){
                var str = ``;
                str += `
                <div class="datalista shiyong">
                    <span class="dataleft">审核时间</span>
                    <span class="dataright" id="checktime"></span>
                </div>
                <div class="datalista shiyong">
                    <span class="dataleft">审核结果</span>
                    <span class="dataright" id="checkresult"></span>
                </div>

                <div class="datalista shiyong">
                    <span class="dataleft">驳回处理人</span>
                    <span class="dataright" id="refuseper"></span>
                </div>

                <div class="datalista jcjg">
                    <div>驳回原因</div>
                    <p id="refusewhy" style="color:#7F94B2;"></p>
                </div>
                
                `;

                return str;
            }

            function showhuidan(){
                var str = ``;
                str += `
                <div class="datalista shiyong">
                    <span class="dataleft">处理时间</span>
                    <span class="dataright" id="dealtime"></span>
                </div>

                <div class="datalista shiyong">
                    <span class="dataleft">处理人</span>
                    <span class="dataright" id="dealname"></span>
                </div>

                <div class="datalista jcjg">
                    <div>处理结果</div>
                    <p id="dealresult" style="color:#7F94B2;"></p>
                </div>

                <div class="datalista jcjg">
                    <div>处理措施</div>
                    <p id="dealway" style="color:#7F94B2;"></p>
                </div>

                <div id="img_wrap">
                    <h3>处理图片</h3>
                    <div class="content-img" id="showimg">
                    </div>
                </div>

                <div id="file_wrap">
                    <h3>附件</h3>
                    <div class="content-img" id="showfile">
                    </div>
                </div>`;

                return str;
            }




            // 图片
            function imgeach(uploadimg){
                var str = '';
                for(var i=0;i<uploadimg.length;i++){
                    str += `<img src="http://` + uploadimg[i] + `" alt="" data-action="zoom">`;
                }
                return str;
            }

            

            function eachfile(uplodfile){
                var str = '';
                for(var k=0;k<uplodfile.length;k++){
                    str += `<span onclick="window.location.href='http://112.74.169.99:21021/Temp/Upload/` + uplodfile[k][0] + `'">` + uplodfile[k][0] + `</span>`;
                }
                return str;
            }



        });
    </script>

</body>

</html>